import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;


public class DataReader {
	public static void main(String[] args) throws IOException {
		File file = new File(args[0]);
		BufferedReader reader = new BufferedReader(new FileReader(file));
		String s = null;
		do{
			s = reader.readLine();
			s = s.trim();
			String[] parts = s.split(",");
			if(s == null)
				break;
			Long userid = Long.parseLong(parts[0]);
			Long itemid = Long.parseLong(parts[1]);
			System.out.println(userid + " " + itemid);
		}while(s != null);
		reader.close();
	}
}
